<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(['prefix'=>'shop_admin','middleware'=>'admin_auth'],function(){
	//商城配置
	Route::get('/config/index','ConfigController@index')->name('shop_admin.config.index'); 
	//商城配置数据处理
	Route::put('/config/{id}/update','ConfigController@update')->name('shop_admin.config.update');
	
	
	
	//商品分类
	Route::get('/product_type/index','ProductTypeController@index')->name('shop_admin.product_type.index'); 
	Route::post('/product_type/data', 'ProductTypeController@data')->name('shop_admin.product_type.data');
	//添加
	Route::get('/product_type/create','ProductTypeController@create')->name('shop_admin.product_type.create');
	Route::post('/product_type/store','ProductTypeController@store')->name('shop_admin.product_type.store');
	//添加子级
	Route::get('/product_type/{id}/create_sublevel','ProductTypeController@create_sublevel')->name('shop_admin.product_type.create_sublevel'); 
	Route::post('/product_type/store_sublevel','ProductTypeController@store_sublevel')->name('shop_admin.product_type.store_sublevel');
	//编辑
	Route::get('/product_type/{id}/edit','ProductTypeController@edit')->name('shop_admin.product_type.edit');
	Route::put('/product_type/{id}/update','ProductTypeController@update')->name('shop_admin.product_type.update');
	//状态
	Route::put('/product_type/{id}/status','ProductTypeController@status')->name('shop_admin.product_type.status');
	//是否推荐首页
	Route::put('/product_type/{id}/open','ProductTypeController@open')->name('shop_admin.product_type.open');
	//排序
	Route::put('/product_type/{id}/sorts','ProductTypeController@sorts')->name('shop_admin.product_type.sorts'); 	
	//单个删除
	Route::delete('/product_type/destroy','ProductTypeController@destroy')->name('shop_admin.product_type.destroy');
	
	
	
	//商品属性
	Route::get('/product_attrbute_key/index','ProductAttrbuteKeyController@index')->name('shop_admin.product_attrbute_key.index'); 
	Route::get('/product_attrbute_key/data', 'ProductAttrbuteKeyController@data')->name('shop_admin.product_attrbute_key.data');
	//添加
	Route::get('/product_attrbute_key/create','ProductAttrbuteKeyController@create')->name('shop_admin.product_attrbute_key.create'); 
	Route::post('/product_attrbute_key/store','ProductAttrbuteKeyController@store')->name('shop_admin.product_attrbute_key.store');
	
	//编辑
	Route::get('/product_attrbute_key/{id}/edit','ProductAttrbuteKeyController@edit')->name('shop_admin.product_attrbute_key.edit');
	Route::put('/product_attrbute_key/{id}/update','ProductAttrbuteKeyController@update')->name('shop_admin.product_attrbute_key.update');
	//状态
	Route::put('/product_attrbute_key/{id}/status','ProductAttrbuteKeyController@status')->name('shop_admin.product_attrbute_key.status');
	//排序
	Route::put('/product_attrbute_key/{id}/sorts','ProductAttrbuteKeyController@sorts')->name('shop_admin.product_attrbute_key.sorts'); 	
	
	//单个删除
	Route::delete('/product_attrbute_key/destroy','ProductAttrbuteKeyController@destroy')->name('shop_admin.product_attrbute_key.destroy');
	
	
	
	//商品属性值
	Route::get('/product_attrbute_value/index','ProductAttrbuteValueController@index')->name('shop_admin.product_attrbute_value.index'); 
	Route::get('/product_attrbute_value/data', 'ProductAttrbuteValueController@data')->name('shop_admin.product_attrbute_value.data');
	//添加
	Route::get('/product_attrbute_value/create','ProductAttrbuteValueController@create')->name('shop_admin.product_attrbute_value.create'); 
	Route::post('/product_attrbute_value/store','ProductAttrbuteValueController@store')->name('shop_admin.product_attrbute_value.store');
	
	//编辑
	Route::get('/product_attrbute_value/{id}/edit','ProductAttrbuteValueController@edit')->name('shop_admin.product_attrbute_value.edit');
	Route::put('/product_attrbute_value/{id}/update','ProductAttrbuteValueController@update')->name('shop_admin.product_attrbute_value.update');
	//状态
	Route::put('/product_attrbute_value/{id}/status','ProductAttrbuteValueController@status')->name('shop_admin.product_attrbute_value.status');
	//排序
	Route::put('/product_attrbute_value/{id}/sorts','ProductAttrbuteValueController@sorts')->name('shop_admin.product_attrbute_value.sorts'); 	
	
	//单个删除
	Route::delete('/product_attrbute_value/destroy','ProductAttrbuteValueController@destroy')->name('shop_admin.product_attrbute_value.destroy');
	//获取属性
	Route::get('/product_attrbute_value/{id}/attrbute_key','ProductAttrbuteValueController@attrbute_key')->name('shop_admin.product_attrbute_value.attrbute_key');
	
	
	
	//商品管理
	Route::get('/product/index','ProductController@index')->name('shop_admin.product.index'); 
	Route::get('/product/data', 'ProductController@data')->name('shop_admin.product.data');
	//添加
	Route::get('/product/create','ProductController@create')->name('shop_admin.product.create'); 
	Route::post('/product/store','ProductController@store')->name('shop_admin.product.store');
	
	//编辑
	Route::get('/product/{id}/edit','ProductController@edit')->name('shop_admin.product.edit');
	Route::put('/product/{id}/update','ProductController@update')->name('shop_admin.product.update');
	//上架下架
	Route::put('/product/{id}/status','ProductController@status')->name('shop_admin.product.status');
	//是否精品推荐
	Route::put('/product/{id}/recommend_status','ProductController@recommend_status')->name('shop_admin.product.recommend_status');
	
	
	//是否热卖单品
	Route::put('/product/{id}/best_status','ProductController@best_status')->name('shop_admin.product.best_status');
	//排序
	Route::put('/product/{id}/sorts','ProductController@sorts')->name('shop_admin.product.sorts'); 	
	
	//单个删除
	Route::delete('/product/destroy','ProductController@destroy')->name('shop_admin.product.destroy');
	
	
	//评论列表
	Route::get('/product/comments_index','ProductController@comments_index')->name('shop_admin.product.comments_index'); 
	Route::get('/product/comments_data', 'ProductController@comments_data')->name('shop_admin.product.comments_data');
	//评论列表单个删除
	Route::delete('/product/comments_destroy','ProductController@comments_destroy')->name('shop_admin.product.comments_destroy');
	//评论列表批量删除
	Route::delete('/product/comments_destroy_all','ProductController@comments_destroy_all')->name('shop_admin.product.comments_destroy_all');
	
	
	
	//获取属性值
	Route::get('/product/{ids}/attrbute_value','ProductController@attrbute_value')->name('shop_admin.product.attrbute_value');
	//获取属性
	Route::get('/product/{id}/attrbute_key','ProductController@attrbute_key')->name('shop_admin.product.attrbute_key');
	
	//添加属性
	Route::post('/product/attrbute_key_store','ProductController@attrbute_key_store')->name('shop_admin.product.attrbute_key_store');
	
	//添加属性值
	Route::post('/product/attrbute_value_store','ProductController@attrbute_value_store')->name('shop_admin.product.attrbute_value_store');
	
	
	
	//商品热搜
	Route::get('/top_search/index','TopSearchController@index')->name('shop_admin.top_search.index'); 
	Route::get('/top_search/data', 'TopSearchController@data')->name('shop_admin.top_search.data');
	//添加
	Route::get('/top_search/create','TopSearchController@create')->name('shop_admin.top_search.create'); 
	Route::post('/top_search/store','TopSearchController@store')->name('shop_admin.top_search.store');
	
	//编辑
	Route::get('/top_search/{id}/edit','TopSearchController@edit')->name('shop_admin.top_search.edit');
	Route::put('/top_search/{id}/update','TopSearchController@update')->name('shop_admin.top_search.update');
	//状态
	Route::put('/top_search/{id}/status','TopSearchController@status')->name('shop_admin.top_search.status');
	//状态首页调整
	Route::put('/top_search/{id}/searches_status','TopSearchController@searches_status')->name('shop_admin.top_search.searches_status');
	//排序
	Route::put('/top_search/{id}/sorts','TopSearchController@sorts')->name('shop_admin.top_search.sorts'); 	
	
	//单个删除
	Route::delete('/top_search/destroy','TopSearchController@destroy')->name('shop_admin.top_search.destroy');
	
	//会员管理
	Route::get('/user/index','UserController@index')->name('shop_admin.user.index'); 
	Route::get('/user/data', 'UserController@data')->name('shop_admin.user.data');
	//状态
	Route::put('/user/{id}/status','UserController@status')->name('shop_admin.user.status');
	//单个删除
	Route::delete('/user/destroy','UserController@destroy')->name('shop_admin.user.destroy');
	
	
	//充值模板
	Route::get('/recharge/index','RechargeController@index')->name('shop_admin.recharge.index'); 
	Route::get('/recharge/data', 'RechargeController@data')->name('shop_admin.recharge.data');
	//添加
	Route::get('/recharge/create','RechargeController@create')->name('shop_admin.recharge.create'); 
	Route::post('/recharge/store','RechargeController@store')->name('shop_admin.recharge.store');
	
	//编辑
	Route::get('/recharge/{id}/edit','RechargeController@edit')->name('shop_admin.recharge.edit');
	Route::put('/recharge/{id}/update','RechargeController@update')->name('shop_admin.recharge.update');
	//状态
	Route::put('/recharge/{id}/status','RechargeController@status')->name('shop_admin.recharge.status');
	//排序
	Route::put('/recharge/{id}/sorts','RechargeController@sorts')->name('shop_admin.recharge.sorts'); 	
	
	//单个删除
	Route::delete('/recharge/destroy','RechargeController@destroy')->name('shop_admin.recharge.destroy');
	
	//充值记录
	Route::get('/recharge_log/index','RechargeLogController@index')->name('shop_admin.recharge_log.index'); 
	Route::get('/recharge_log/data', 'RechargeLogController@data')->name('shop_admin.recharge_log.data');
	
	
	
	//意见反馈
	Route::get('/couple/index','CoupleController@index')->name('shop_admin.couple.index'); 
	Route::get('/couple/data', 'CoupleController@data')->name('shop_admin.couple.data');
	//单个删除
	Route::delete('/couple/destroy','CoupleController@destroy')->name('shop_admin.couple.destroy');
});














